<template id="detail">
    <div>
        <div id="detail_ming">
        <div class="img_tu" v-html="data.goods_desc"></div>
        </div>
        <v-shopCardetail></v-shopCardetail>
    </div>
</template>
<script>
    import  shopCardetail from './shopCardetail.vue'
    export default{
        name: 'detail',
        components:{
        'v-shopCardetail':shopCardetail
        },
        data() {
            return {
                id:this.$route.query.goods_id,
                data:[]
            }
        },
        mounted:function () {
            let H = $(window).height()-100
            $('#detail_ming').height(H)
            /*获取容器的高度*/
            this.$http.jsonp(
                this.GLOBAL.BaseUrl+'/mobile/api/v1/Goods.php?mode=goodsDesc',
                {params:{goods_id:this.id}, jsonp:'callback'}
            ).then(function(res){
                if (res.body.code != 200) {
                    alert(res.body.msg);
                    return false;
                }

                this.data=res.body.data;
                console.log(this.data);
            });
        }
    };

</script>
<style>
    #detail_ming{
        overflow-y: scroll;
    }
.img_tu img{
    display:block;
    width:100%;
    height: auto;
}
</style>
